<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    ul {
      width: 300px;
      margin-left: -1px;
      list-style: none;
    }

    li {
      float: left;
      width: 99px;
      line-height: 30px;
      text-align: center;
      border-left: 1px solid #999;
      font-size: 18px;
      margin-bottom: 10px;
    }

    .ul-container {
      width: 300px;
      margin: 50px auto;
      overflow: hidden;
      background: #eee;
      padding: 10px 0;
    }
  </style>
</head>

<body>
  <div class="ul-container">
    <ul>
      <li>测试</li>
      <li>消失</li>
      <li>边界线</li>
      <li>右侧</li>
      <li>边界线</li>
      <li>消失</li>
      <li>测试</li>
    </ul>
  </div>

</body>

</html>